import React, { Component } from 'react';
import { connect } from 'react-redux';
import {fromJS} from 'immutable';
import { BtnWrap } from './style';
import { Button } from 'antd-mobile';
class BuyDom extends Component {
    render() {
        let { isLogin } = this.props;
        return isLogin ? this.createdBuy() : "";
    }
    createdBuy() {
        return (
                <BtnWrap>
                      <Button inline size="small" type="primary">收藏</Button> 
                      <Button inline size="small" type="warning">购买</Button> 
                </BtnWrap>
        )
    }
}
const mapStateToProps = (state, ownProps) => {
    state= fromJS(state);
    return {
        isLogin: state.getIn(["login", "isLogin"]),
        userInfor: state.getIn(["login", "userInfor"]).toJS(),
    };
};
const mapDispatchToProps = (dispatch, ownProps) => {
    return {
    };
};
export default connect(mapStateToProps, mapDispatchToProps)(BuyDom);